home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung (Tewi)(1994).iso
/
magazine
/
dbms_mag
/
9103
/
techtip2.mar
< prev
next >
Wrap
Text File
|
1991-01-30
|
693b
|
28 lines
/****************************************************
*
* STRREP -- replace a char in a string
* strrep (str, pos, ch) is the same as the C line
* str [pos]=ch ;
* except that Clipper numbers arrays from 1, not 0.
*
* In order for this to link properly, you need to
* compile with the -N- switch. This prevents
* Turbo C from checking thhe stack for overflow:
* tcc -c -N- -ml strrep
*
*****************************************************
#include <nandef.h>
#include <extend.h>
CLIPPER strrep (void)
{
char *str = _parc (1) ;
int pos = _parni(2) ;
char *rep = _parc (3) ;
str[pos-1] = *rep ;
_ret() ;
}